from ronglian_sms_sdk import SmsSDK
import json


class RLYSend():
    def __init__(self):
        self.accid = '8a216da87ce04099017ceb18d27a0310'
        self.acctoken = '964d4cc0f8a14400987e77879ccf9395'
        self.appid = '8a216da87ce04099017ceb18d3950317'

    def send_messger(self,phone, code):

        sdk = SmsSDK(self.accid, self.acctoken, self.appid)
        tid = '1'
        mobile = phone
        datas = (code, 1)
        resp = sdk.sendMessage(tid, mobile, datas)
        print(resp)
        return json.loads(resp, encoding="utf-8")



rlysend = RLYSend()











